<?
include_once "../../mode/lang/error.php";
include_once "../../mode/message/lockAction.php";
include_once "../../mode/message/blog.php";
include_once "../../mode/table/tbhelper.php";

$db = new db("mysql:host=localhost;dbname=sns","zyn","zyn");
//print_r(tbhelper::produce("dairy"));
$blog = new blog($db,tbhelper::produce("dairy")); 

$blogLockAction = $blog->getAction(recourse::LOCK);
$blogLockAction->setData(1);
//print_r($blogLockAction);
if($blogLockAction->checkData()){
	echo $blogLockAction->run();
	echo "OK";
}
else{
	echo "CheckDataError";
}
?>